home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / clang / gnumake.zip / MAKEFILE.OS2 < prev    next >
Text File  |  1994-04-24  |  4KB  |  111 lines

  1. #
  2. #    Makefile for GNU Make
  3. #
  4.  
  5. srcdir = .
  6. VPATH = .
  7.  
  8. release:
  9.     $(MAKE) -f Makefile.os2 all CC="gcc -s -O" O=".o"
  10. debug:
  11.     $(MAKE) -f Makefile.os2 all CC="gcc -g" O=".o"
  12. os2only:
  13.     $(MAKE) -f Makefile.os2 all CC="gcc -s -O -Zomf -Zmtd" O=".obj"
  14.  
  15. CFLAGS = -DHAVE_CONFIG_H -DINCLUDEDIR=\"/emx/include\" -DLIBDIR=\"/emx/lib\"
  16.  
  17. # If you are using the GNU C library, or have the GNU getopt functions in
  18. # your C library, you can comment these out.
  19. GETOPT = getopt$O getopt1$O
  20. GETOPT_SRC = $(srcdir)/getopt.c $(srcdir)/getopt1.c $(srcdir)/getopt.h
  21.  
  22. # If you are using the GNU C library, or have the GNU glob functions in
  23. # your C library, you can comment this out.  GNU make uses special hooks
  24. # into the glob functions to be more efficient (by using make's directory
  25. # cache for globbing), so you must use the GNU functions even if your
  26. # system's C library has the 1003.2 glob functions already.  Also, the glob
  27. # functions in the AIX and HPUX C libraries are said to be buggy.
  28. GLOB = glob/glob$O glob/fnmatch$O
  29.  
  30. # If your system doesn't have alloca, or the one provided is bad, define this.
  31. ALLOCA = 
  32. ALLOCA_SRC = 
  33.  
  34. # If your system needs extra libraries loaded in, define them here.
  35. # System V probably need -lPW for alloca.  HP-UX 7.0's alloca in
  36. # libPW.a is broken on HP9000s300 and HP9000s400 machines.  Use
  37. # alloca.c instead on those machines.
  38. LOADLIBES = make.def
  39.  
  40. # If there are remote execution facilities defined,
  41. # enable them with switches here (see remote-*.c).
  42. REMOTE = stub
  43.  
  44. # Any extra object files your system needs.
  45. extras = 
  46.  
  47. # Whether or not make needs to be installed setgid.
  48. # The value should be either `true' or `false'.
  49. # On many systems, the getloadavg function (used to implement the `-l'
  50. # switch) will not work unless make is installed setgid kmem.
  51.  
  52. objs = commands$O job$O dir$O file$O misc$O main$O read$O remake$O    \
  53.        remote$O rule$O implicit$O default$O variable$O expand$O        \
  54.        function$O vpath$O version$O ar$O arscan$O signame$O        \
  55.        getloadavg$O $(GLOB) $(GETOPT) $(ALLOCA) $(extras)
  56.  
  57. .PHONY: all
  58. all: make.exe
  59.  
  60. make.exe : $(objs)
  61.     $(CC) $(LDFLAGS) $(objs) $(LOADLIBES) -o $@
  62.  
  63.  
  64. # -I. is needed to find config.h in the build directory.
  65. %$O: %.c
  66.     $(CC) -c -I. -I$(srcdir) -I$(srcdir)/glob \
  67.           $(CFLAGS) $< $(OUTPUT_OPTION)
  68. remote$O: remote-$(REMOTE).c
  69.     $(CC) -c -I. -I$(srcdir) \
  70.           $(CFLAGS) $(srcdir)/remote-$(REMOTE).c $(OUTPUT_OPTION)
  71.  
  72. # For some losing Unix makes.
  73. MAKE = make
  74.  
  75. glob/glob$O glob/fnmatch$O: 
  76.     $(MAKE) -C glob -f Makefile.os2 CC="$(CC)" O="$(O)"
  77.  
  78. config.h:
  79.  
  80. # This tells versions [3.59,3.63) of GNU make not to export all variables.
  81. .NOEXPORT:
  82.  
  83. # Automatically generated dependencies will be put at the end of the file.
  84.  
  85. # Automatically generated dependencies.
  86. commands$O : commands.c make.h config.h dep.h commands.h file.h variable.h \
  87.   job.h 
  88. job$O : job.c make.h config.h commands.h job.h file.h variable.h 
  89. dir$O : dir.c make.h config.h 
  90. file$O : file.c make.h config.h commands.h dep.h file.h variable.h 
  91. misc$O : misc.c make.h config.h dep.h 
  92. main$O : main.c make.h config.h commands.h dep.h file.h variable.h job.h \
  93.   getopt.h 
  94. read$O : read.c make.h config.h commands.h dep.h file.h variable.h glob/glob.h 
  95. remake$O : remake.c make.h config.h commands.h job.h dep.h file.h 
  96. remote$O : remote-$(REMOTE).c make.h commands.h 
  97. rule$O : rule.c make.h commands.h dep.h file.h variable.h rule.h 
  98. implicit$O : implicit.c make.h config.h rule.h dep.h file.h 
  99. default$O : default.c make.h config.h rule.h dep.h file.h commands.h variable.h 
  100. variable$O : variable.c make.h config.h commands.h variable.h dep.h file.h 
  101. expand$O : expand.c make.h config.h commands.h file.h variable.h 
  102. function$O : function.c make.h config.h variable.h dep.h commands.h job.h 
  103. vpath$O : vpath.c make.h config.h file.h variable.h 
  104. version$O : version.c 
  105. ar$O : ar.c make.h file.h 
  106. arscan$O : arscan.c make.h config.h 
  107. signame$O : signame.c signame.h 
  108. getopt$O : getopt.c config.h getopt.h 
  109. getopt1$O : getopt1.c config.h getopt.h 
  110. getloadavg$O : getloadavg.c config.h 
  111.